Bite 19. Write a property
Login and get codingWrite a simple
Promoclass. Its constructor receives two variables:name(which must be a string) andexpires(which must be adatetimeobject).Add a
propertycalledexpiredwhich returns a boolean value indicating whether the promo has expired or not.Checkout the tests and
datetimemodule for more info. Have fun!
1089 out of 1160 users completed this Bite.
Will you be the 1090th person to crack this Bite?
Resolution time: ~36 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 4.5 on a 1-10 difficulty scale.
» Up for a challenge? 💪